The technology described herein relates to methods of and apparatus for using and handling textures, and in particular for carrying out so-called “virtual texturing”, in computer graphics systems.
It is common in computer graphics systems to generate colors for sampling positions in an image to be displayed by applying so-called textures or texture data to the surfaces to be drawn. For example, surface detail on objects may be generated by applying a predefined “texture” to a set of graphics primitives (such as polygons) representing the object, to give the rendered image of the object the appearance of the “texture”. Such textures are typically applied by storing an array of texture elements or “texels”, each representing given texture data (such as color, luminance, and/or light/shadow, etc., values) at a given location (position), and then mapping the texels onto the corresponding elements, such as (and, indeed, typically) a set of sampling positions, for the image to be displayed. The stored arrays of texture elements (data) are typically referred to as “texture maps”.
Some graphics texture mapping arrangements use so-called “virtual texturing”. In virtual texturing, a single very large texture is stored in some form of external memory (such as on a removable storage media, or the host computer's hard drive), and then parts of that large texture are loaded as needed into the local memory, e.g. RAM, of the graphics processing system for use. This allows a single larger texture map to be used for the texture in question, but without the need to store the entire large texture in the local memory of the graphics processing system in use.
Virtual texturing is used, for example, to allow the use of a single large texture for static terrain (e.g. in games), rather than having to repeat multiple smaller textures. Virtual texturing can allow large amounts of detail and variation over a large area to be included in a single texture, but without the need to fill the graphics processing system's local memory with all of the texture map at the same time. As the player, e.g., moves around in the game, different portions of the texture map are loaded into the graphics processor's local memory and used to display the appropriate terrain for the player's current game position.
Virtual texturing is also used for so-called texture “atlases”, where multiple smaller textures are packed into a single larger texture map.
Other terms for virtual texturing include “mega textures” and “partially resident textures”. It is also known to perform so-called “sparse texturing”. This is similar to “virtual texturing” in that the whole texture need not be present in the local memory of the graphics processing system, but unlike in virtual texturing, in sparse texturing there is no system for handling texture accesses outside the texture data that is present in the local memory. The term “virtual texturing” will be used herein for convenience, but it should be understood that the technology described herein is applicable to all these (and any other) forms of texturing used in graphics processing systems where only limited parts of a larger overall texture are kept in the local memory of the graphics processing system at any given time.
In virtual texturing, the parts that the large texture is divided into for the purposes of loading it into the local memory of the graphics processing system are typically referred to as “pages”, although other terms, such as “tiles”, may be used. For convenience, the term “pages” will primarily be used herein to refer to the respective different parts that the large texture is divided into for the purposes of loading it into the local memory of the graphics processing system for virtual texturing purposes. However, it should be understood that such references to “pages” simply refers to the respective sub-regions or parts that the overall texture is divided into for the purposes of loading it into the local memory of the graphics processing system, and so includes any equivalent terms.
Like numerals are used for like features in the drawings (where appropriate).